home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
unixSyscall
/
sigpause.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-06-19
|
1KB
|
65 lines
/*
* sigpause.c --
*
* Procedure to map from Unix sigsetmask system call to Sprite.
* Note: many Unix signals are not supported under Sprite.
*
* Copyright 1986 Regents of the University of California
* All rights reserved.
*/
#ifndef lint
static char rcsid[] = "$Header: sigpause.c,v 1.1 88/06/19 14:32:00 ouster Exp $ SPRITE (Berkeley)";
#endif not lint
#include "sprite.h"
#include "sig.h"
#include "compatInt.h"
#include <signal.h>
#include <errno.h>
/*
*----------------------------------------------------------------------
*
* sigpause --
*
* Procedure to map from Unix sigsetmask system call to Sprite
* Sig_SetHoldMask.
*
* Results:
* UNIX_ERROR is returned upon error, with the actual error code
* stored in errno. Upon success, the previous signal mask is returned.
*
* Side effects:
* The current signal mask is modified.
*
*----------------------------------------------------------------------
*/
int
sigpause(mask)
int mask; /* new mask */
{
int spriteMask = 0; /* equivalent mask for Sprite */
ReturnStatus status; /* generic result code */
status = Compat_UnixSigMaskToSprite(mask,&spriteMask);
if (status == FAILURE) {
errno = EINVAL;
return( UNIX_ERROR);
}
status = Sig_Pause(spriteMask);
if (status != SUCCESS) {
errno = Compat_MapCode(status);
/*
* Does anyone check for -1 upon return or does it look like a mask?
*/
return(UNIX_ERROR);
} else {
errno = EINTR;
return(UNIX_ERROR);
}
}